<template>
  <div>
    <h2>我是Home内容</h2>
    <div>
      <ul class="nav nav-tabs">
        <li>
          <!-- to的路径注意要带上/home -->
          <router-link class="list-group-item" active-class="active" to="/home/news">News</router-link>
        </li>
        <li>
          <router-link class="list-group-item" active-class="active" to="/home/messages">Message</router-link>
        </li>
      </ul>
      <router-view>
      </router-view>
    </div>
  </div>
</template>

<script>
export default {
  name:'Home',
  mounted(){
    console.log('Home组件挂载完毕');
  },
  destroyed(){
    console.log('Home组件被销毁了');
  }
}
</script>

<style>

</style>